package com.real8.plusplayground.client.menu;

import com.real8.plusplayground.client.ClientFactory;
import com.real8.plusplayground.client.activity.ActivityReadPlace;
import com.real8.plusplayground.client.miscellaneous.MiscellaneousPlace;
import com.real8.plusplayground.client.person.PersonPlace;
import com.real8.plusplayground.client.statistics.StatisticsPlace;

public class MenuPresenter implements MenuView.Presenter {
	private final ClientFactory clientFactory;

	public MenuPresenter(ClientFactory clientFactory) {
		this.clientFactory = clientFactory;
		clientFactory.getMenuView().setPresenter(this);
	}

	@Override
	public void onMiscellaneousSelected() {
		clientFactory.getPlaceController().goTo(new MiscellaneousPlace());
	}

	@Override
	public void onActivityReadSelected() {
		clientFactory.getPlaceController().goTo(
				new ActivityReadPlace("z12aj5zrhsexindqa04cjvig1t23shhavxk0k"));
	}

	@Override
	public void onPersonReadSelected() {
		clientFactory.getPlaceController().goTo(new PersonPlace("me"));
	}

	@Override
	public void onStatisticsSelected() {
		clientFactory.getPlaceController().goTo(new StatisticsPlace("me"));
	}
}
